<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>js-点击事件过程</title>
</head>
<body>
    <div id="app">
        <div id="mouse" style="background-color:green;width:120px;height:20px;padding:40px;color:#ffffff;">点击我</div>
    </div>

    <script>
        var div = document.getElementById('mouse');
        div.onmousedown = function (){
            div.innerHTML = "谢谢";
            div.style.backgroundColor = "blue";
        }
        div.onmouseup = function (){
            div.innerHTML = "把鼠标移到上面";
            div.style.backgroundColor = "green";
        }
    </script>
</body>
</html>